package graphAndAnswer;

import interfaces.BuildGraph;
import graph.GenericGraph;

public class ModuleHandleidingGraph implements BuildGraph {

	public ModuleHandleidingGraph() {

	}

	public GenericGraph getGraph() {
		GenericGraph graph = new GenericGraph();
		addNodes(graph);
		addRoads(graph);
		return graph;
	}

	public void addNodes(GenericGraph graph) {
		graph.addNode("A");
		graph.addNode("B");
		graph.addNode("C");
		graph.addNode("D");
		graph.addNode("E");
		graph.addNode("F");
		graph.addNode("G");
	}

	public void addRoads(GenericGraph graph) {
		graph.addEdge("A", "B", 3);
		graph.addEdge("A", "D", 1);
		graph.addEdge("A", "G", 3);
		graph.addEdge("B", "F", 1);
		graph.addEdge("B", "C", 1);
		graph.addEdge("D", "E", 1);
		graph.addEdge("G", "F", 2);
		graph.addEdge("E", "F", 1);
		graph.addEdge("F", "C", 1);
	}
}
